import React, { useRef } from 'react';
// import { userState } from 'react';
const App = () => {
  // 状态数据
  let searchInput = useRef()

  return (
    <div>
        <input ref={searchInput} placeholder='请输入搜索关键字'/>
        <button onClick={()=>{console.log(searchInput.current.value)}}>搜素</button>
    </div>
  );
}

export default App;
